package com.awspaas.user.apps.publicservice.util;

/**
 * @Title: WechatRecall
 * @Package com.awspaas.user.apps.publicservice.util
 * @Description:
 * @Author wanglx
 * @Date 2022/10/25
 */
public class WechatRecall {

    /**
     * 企业微信系统消息撤回功能
     * @param taskinstId
     * @return
     */
    public static String reCall(String taskinstId,String corpId,String agentId){
        String result = "";

      /*  try {
            String wechatmsgId = DBSql.getString("SELECT WECHATMSGID FROM BO_EU_O45_TASK_SYNC_LOG " +
                    "WHERE TASKINST_ID =?",new Object[]{taskinstId});
            //获取access_token
            WechatModel wechatModel = WechatCache.getModelByCorpId(corpId);
            WechatAppsModel appsModel = WechatAppsCache.loadWechatApp(wechatModel.getId(), agentId);
            AccessToken token = AccessTokenCache.getToken(appsModel);
            String accessToken = token.getAccessToken();
            System.out.println("accessToken-----------"+accessToken);

            //接口地址
            String url = "https://qyapi.weixin.qq.com/cgi-bin/message/recall?access_token="+accessToken;

            JSONObject jsonObject = new JSONObject();
            jsonObject.put("msgid",wechatmsgId);

            result = sendPost(url,jsonObject);


        }catch (Exception e){
            e.printStackTrace();
        }*/

        return result;
    }
}